<template>
<view class="page">  
	<template v-if="userInfo">
		<view class="body">
			<view class="mod-wrap">
				<view class="hd">虫情监测</view>
				<view class="con menu-list">
					<navigator url="/package_pests/pest_list/pest_list" hover-class="none" class="item">
						<view class="icon"><image src="@/static/images/pest_data.png" mode="widthFix"></image></view>
						<view class="name">害虫识别</view>
					</navigator>
					<view class="item">
						<view class="icon"><image src="@/static/images/pest_pic.png" mode="widthFix"></image></view>
						<view class="name">虫害数据</view>
					</view>
					<view class="item">
						<view class="icon"><image src="@/static/images/pest_weather.png" mode="widthFix"></image></view>
						<view class="name">气象数据</view>
					</view> 
				</view>
			</view>
		</view>  
	</template>
</view>
</template>

<script> 
export default {
	name:'name',
	data(){
		return {
			isLogin:false,
			userInfo:uni.getStorageSync('userInfo'),
			loginStateUpdate:false
		}
	},
	onLoad() {
		
	},
	async onShow() {
		if(!this.userInfo){
			this.isLogin=await this.$loginState('reset'); 
		}
		console.log('登录状态',this.loginStateUpdate)
		if(this.loginStateUpdate){
			
			this.userInfo=uni.getStorageSync('userInfo');
			this.loginStateUpdate=false;
		}
	},
	methods:{
		
	},
	components:{ 
	},
	computed:{
		
	},
	watch:{
		
	}
	
}
</script>

<style lang="less">
.mod-wrap{
	background: #FFFFFF;
	margin:20rpx;
	border-radius: 15rpx;
	.hd{
		padding:20rpx ;
		font-size: 30rpx;
		font-weight: bold;
	}
	.con{ 
	}
}
.menu-list{
	display: flex;
	flex-wrap: wrap;
	padding:20rpx 10rpx 0;
	.item{
		width:25%;
		// flex-grow: 1;
		margin-bottom: 30rpx;
		.icon{
			width:40%; 
			margin: 0 auto 10rpx;
		}
		.name{
			text-align: center;
			font-size: 28rpx;
		}
	}
}
</style>
